package scau.gsmg.misp.service;

import java.util.Date;
import java.util.List;

/**
 * @Title 收银的所有操作
 * @Group gaoshenmegui
 * @author ZCL
 * @date 2015年4月9日
 */
public interface ICheckoutService {
	/**
	 * @Description 收银员通过商品条码搜索商品
	 */
	public List searchGoodsById(String barcode) throws Exception;

	/**
	 * @Description 得到单号,flag为“sp”返回支付单号，flag为“so”返回销售单号
	 */
	public String gainOrder(String flag) throws Exception;

	/**
	 * @Description 挂账
	 */
	public String suspendBill(String rowObj, int customerId, double totalPrice,
			String saleId, int amount, double receivables) throws Exception;

	/**
	 * @Description 提取单据
	 */
	public List gainSuspend() throws Exception;

	/**
	 * @Description 获取单据中的商品
	 */
	public List gainSuspendGoods(int suspendId) throws Exception;

	/**
	 * @Description 删除挂账信息
	 */
	public boolean deleteRecord(int suspendId) throws Exception;

	/**
	 * @Description 销售开单
	 */
	public boolean makeSaleOrder(String rowObj, int customerId,
			double totalPrice, String saleId, int amount, double receivables)
			throws Exception;

	/**
	 * @Description 结算支付
	 */
	public boolean checkout(int cashierId, double totalPrice, double realPay,
			double changes, String saleId, String paymentMethod,
			String paymentId) throws Exception;

	/**
	 * @Description 更新库存
	 */
	public boolean updateInventory(String rowObj) throws Exception;
	
	/**
	 * @Description 得到支付记录
	 */
	public List getPayments(String page, String rows, String sort,
			String order) throws Exception;
	
	/**
	 * @Description 得到所有支付记录数
	 */
	public int gainPaymentSize() throws Exception;
	
	/**
	 * @Description 打印小票
	 */
	public List outputReceipt(String paymentId) throws Exception;
	
	/**
	 * @Description 通过支付单号得到销售单号
	 */
	public String gainSaleOrderId(String paymentId) throws Exception; 
	
	/**
	 * @Description 通过销售单号获取商品
	 */
	public List gainGoods(String saleOrderId) throws Exception; 
	
	/**
	 * @Description 搜索销售记录
	 */
	public List searchSaleRecord(String page, String rows, String sort, String order,Date beginDate,Date endDate,int customerId) throws Exception; 
	/**
	 * @Description 统计搜索记录数
	 */
	public int countSaleRecord(String page, String rows, String sort,
			String order, Date beginDate, Date endDate, int customerId) throws Exception; 

}
